import request from "@/utils/request";

// 分页+条件查询住宿信息
export const queryAccommodationPageApi = (params) => request.post("/accommodation/page", params);

// 新增入住登记
export const checkinApi = (data) => request.post("/accommodation/checkin", data);

// 退宿
export const checkoutApi = (id) => request.post(`/accommodation/checkout/${id}`);

// 调宿
export const changeBedApi = (accommodationId, newBedId, remark) => request.post(`/accommodation/changeBed?accommodationId=${accommodationId}&newBedId=${newBedId}&remark=${remark || ''}`);

// 查询全部住宿信息
export const queryAccommodationAllApi = () => request.get("/accommodation/list");

// 根据ID查询住宿信息
export const queryAccommodationByIdApi = (id) => request.get(`/accommodation/${id}`); 